
package com.kfc.crazy4week.api.controller;


import com.kfc.crazy4week.api.common.bean.Result;
import com.kfc.crazy4week.api.model.dto.WxTranslateDTO;
import com.kfc.crazy4week.api.service.GenerateServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
/**
 * @author weichenxu
 */

@Api(tags = "生成系列")
@RestController
@RequestMapping("/generate")
@RequiredArgsConstructor
public class GenerateController {

    private final GenerateServiceImpl generateService;

    @ApiOperation("输入字符串，生成微信翻译")
    @PostMapping("/wx-translate")
    public Result<?> wxTranslate(@Valid @RequestBody WxTranslateDTO wxTranslateDTO) {
        return Result.success(generateService.wxTranslate(wxTranslateDTO));
    }

}
